package com.turing.data.constants;

import java.util.HashMap;
import java.util.Map;

import com.turing.data.model.excel.BankFinanceExport;
import com.turing.data.model.excel.FundFormExport;
import com.turing.data.model.excel.NewShareExport;
import com.turing.data.model.excel.NoticeExport;
import com.turing.data.model.excel.PayExport;
import com.turing.data.model.excel.ProductContractExport;

/**
 * @Description excel导出常量
 * @Author lcy
 * @Date 2021/5/28 12:56
 */
public class ExcelConstant {

    /**
     * excel导出Class
     */
    public static final Map<String, Class<?>> EXPORT_CLASS_MAP = new HashMap<>();

    /**
     * excel映射
     */
    public static final Map<String, Map<String, String>> EXPORT_NAME_MAP = new HashMap<>();

    /**
     * 缴款字段
     */
    public static final Map<String, String> PAYMENT_NOTICE_MAP = new HashMap<>();

    /**
     * 新股字段
     */
    public static final Map<String, String> NEW_SHARE_MAP = new HashMap<>();

    /**
     * 追加提取通知单
     */
    public static final Map<String, String> NOTICE_MAP = new HashMap<>();

    /**
     * 产品合同
     */
    public static final Map<String, String> PRODUCT_CONTRACT_MAP = new HashMap<>();

    /**
     * 银行理财
     */
    public static final Map<String, String> BANK_FINANCE_MAP = new HashMap<>();

    /**
     * 基金确认单
     */
    public static final Map<String, String> FUND_FORM_MAP = new HashMap<>();

    static {
        //导出对象Map
        //缴款通知书
        EXPORT_CLASS_MAP.put("41", PayExport.class);
        //新股缴款公告
        EXPORT_CLASS_MAP.put("r-12", NewShareExport.class);
        //资产管理合同
        EXPORT_CLASS_MAP.put("11", ProductContractExport.class);
        //追加提取单
        EXPORT_CLASS_MAP.put("34", NoticeExport.class);
        //银行理财
        EXPORT_CLASS_MAP.put("46", BankFinanceExport.class);
        //基金确认单
        EXPORT_CLASS_MAP.put("37", FundFormExport.class);

        //导出字段映射Map
        //缴款通知书
        EXPORT_NAME_MAP.put("41", PAYMENT_NOTICE_MAP);
        //新股缴款公告
        EXPORT_NAME_MAP.put("r-12", NEW_SHARE_MAP);
        //资产管理合同
        EXPORT_NAME_MAP.put("11", PRODUCT_CONTRACT_MAP);
        //追加提取单
        EXPORT_NAME_MAP.put("34", NOTICE_MAP);
        //银行理财
        EXPORT_NAME_MAP.put("46", BANK_FINANCE_MAP);
        //基金确认单
        EXPORT_NAME_MAP.put("37", FUND_FORM_MAP);

        //缴款字段映射
        PAYMENT_NOTICE_MAP.put("缴款日期", "payDate");
        PAYMENT_NOTICE_MAP.put("产品名称", "investorName");
        PAYMENT_NOTICE_MAP.put("债券名称", "bondName");
        PAYMENT_NOTICE_MAP.put("债券代码", "bondCode");
        PAYMENT_NOTICE_MAP.put("缴款金额（元）-小写", "payAmount");
        PAYMENT_NOTICE_MAP.put("开户/账户名称", "bankAccountName");
        PAYMENT_NOTICE_MAP.put("银行账号", "bankAccount");
        PAYMENT_NOTICE_MAP.put("开户银行", "bankName");
        PAYMENT_NOTICE_MAP.put("大额支付行号", "payBankNumber");

        //新股字段映射
        NEW_SHARE_MAP.put("资产组合-公告", "portfolio");
        NEW_SHARE_MAP.put("股东账户-公告", "shareholderAccount");
        NEW_SHARE_MAP.put("证券代码-公告", "securitiesCode");
        NEW_SHARE_MAP.put("中签数量（股）-公告", "winningNumber");
        NEW_SHARE_MAP.put("中签金额（元）-公告", "winningAmount");
        NEW_SHARE_MAP.put("佣金（元）-公告", "commission");
        NEW_SHARE_MAP.put("总金额（元）-公告", "totalAmount");

        //追加提取通知单字段映射
        NOTICE_MAP.put("追加或提取", "appendOrExtract");
        NOTICE_MAP.put("产品名称", "productName");
        NOTICE_MAP.put("金额大写", "amountCapital");
        NOTICE_MAP.put("金额小写", "lowercaseAmount");
        NOTICE_MAP.put("日期", "date");
        NOTICE_MAP.put("账号", "accountNumber");
        NOTICE_MAP.put("户名", "accountName");
        NOTICE_MAP.put("开户行", "openBankName");
        NOTICE_MAP.put("大额支付号", "largePaymentNumber");
        NOTICE_MAP.put("份额大写", "portionLarge");
        NOTICE_MAP.put("份额小写", "portionMin");
        NOTICE_MAP.put("托管费", "depositFee");
        NOTICE_MAP.put("管理费", "manageFee");

        //产品合同字段映射
        PRODUCT_CONTRACT_MAP.put("比例范围", "range");
        PRODUCT_CONTRACT_MAP.put("运作方式1", "operateMethod1");
        PRODUCT_CONTRACT_MAP.put("是否为MOM/FOF产品", "ifMomFof");
        PRODUCT_CONTRACT_MAP.put("合同规定的主要投资范围及投资组合比例", "scopeOfInvestment");
        PRODUCT_CONTRACT_MAP.put("单个投资者最低认购金额", "minSubscribe");
        PRODUCT_CONTRACT_MAP.put("是否按要求说明", "ifRequirement");
        PRODUCT_CONTRACT_MAP.put("最低成立规模", "assetSetupRequirement");
        PRODUCT_CONTRACT_MAP.put("最低投资者数量", "assetSetupRequirementNum");
        PRODUCT_CONTRACT_MAP.put("是否订明资产管理计划成立前，任何机构和个人不得动用投资者参与资金", "ifBeforeAllNotAvailable");
        PRODUCT_CONTRACT_MAP.put("资产管理计划成立后备案完成前，是否开展以下投资活动", "afterIfAvailable");
        PRODUCT_CONTRACT_MAP.put("运作方式2", "operateMethod2");
        PRODUCT_CONTRACT_MAP.put("封闭期", "closedPeriod");
        PRODUCT_CONTRACT_MAP.put("开放频率", "openFrequency");
        PRODUCT_CONTRACT_MAP.put("是否设置临时开放期", "ifTemporaryOpenFrequency");
        PRODUCT_CONTRACT_MAP.put("临时开放期解释说明", "temporaryOpenFrequencyExplaination");
        PRODUCT_CONTRACT_MAP.put("运作期是否允许份额转让", "ifShareTransfer");
        PRODUCT_CONTRACT_MAP.put("是否设立持有人大会", "ifSetupHolders");
        PRODUCT_CONTRACT_MAP.put("存续期", "duration");
        PRODUCT_CONTRACT_MAP.put("标准化", "standardizing");
        PRODUCT_CONTRACT_MAP.put("是否有业绩比较基准", "ifPerformanceBenchmark");
        PRODUCT_CONTRACT_MAP.put("预警线", "warningLine");
        PRODUCT_CONTRACT_MAP.put("预警线数额", "warningLineNumber");
        PRODUCT_CONTRACT_MAP.put("投资杠杆率上限（总资产/净资产）", "upperLimitOfInvestmentLeverageRatio");
        PRODUCT_CONTRACT_MAP.put("建仓期", "warehouseBuildingPeriod");
        PRODUCT_CONTRACT_MAP.put("资产管理计划的估值方法", "valuationMethod");
        PRODUCT_CONTRACT_MAP.put("是否使用摊余成本法", "ifAmortizedCostMethod");
        PRODUCT_CONTRACT_MAP.put("管理费", "managementCosts");
        PRODUCT_CONTRACT_MAP.put("托管费", "custodyFee");
        PRODUCT_CONTRACT_MAP.put("收益分配次数内容填写", "timesOfIncomeDistribution");
        PRODUCT_CONTRACT_MAP.put("合同变更方式", "changeOfContract");
        PRODUCT_CONTRACT_MAP.put("合同终止情形/附加情形", "terminationOfContract");
        PRODUCT_CONTRACT_MAP.put("调解方式", "controlMode");
        PRODUCT_CONTRACT_MAP.put("合同生效附加条件", "effectivenessOfContract");
        PRODUCT_CONTRACT_MAP.put("其他事项内容", "otherrMatters");
        PRODUCT_CONTRACT_MAP.put("是否聘请投资顾问", "ifInvestmentConsultant");
        PRODUCT_CONTRACT_MAP.put("托管人名称(全称)", "trustee");
        PRODUCT_CONTRACT_MAP.put("经办人信息", "operatorInformation");
        PRODUCT_CONTRACT_MAP.put("经办人电话", "operatorTele");
        PRODUCT_CONTRACT_MAP.put("投资经理或投资决策人信息", "investmentManager");
        PRODUCT_CONTRACT_MAP.put("是否涉及境外投资", "ifOutlands");
        PRODUCT_CONTRACT_MAP.put("产品名称（全称）", "productFullName");
        PRODUCT_CONTRACT_MAP.put("产品简称", "productShortName");
        PRODUCT_CONTRACT_MAP.put("FOF/MOM产品", "fofMOM");

        //银行理财
        BANK_FINANCE_MAP.put("产品名称", "productName");
        BANK_FINANCE_MAP.put("理财产品代码", "productCode");
        BANK_FINANCE_MAP.put("日期", "date");
        BANK_FINANCE_MAP.put("业务类别", "serviceCategory");
        BANK_FINANCE_MAP.put("份额", "share");
        BANK_FINANCE_MAP.put("成交金额", "turnover");
        BANK_FINANCE_MAP.put("费用", "cost");
        BANK_FINANCE_MAP.put("利息", "interest");
        BANK_FINANCE_MAP.put("确认日期/截止日期", "confirmationDate");
        BANK_FINANCE_MAP.put("是否结转收益", "carryoverIncome");
        BANK_FINANCE_MAP.put("交易对手", "counterparty");
        BANK_FINANCE_MAP.put("资金账户", "fundAccount");
        BANK_FINANCE_MAP.put("赎回类型", "redemptionType");

        //基金确认单
        FUND_FORM_MAP.put("客户名称", "customerName");
    }

}
